home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / patch / pagestream / pgs32tu3 / scripts.lha / WarpText.rexx < prev   
OS/2 REXX Batch file  |  1996-11-20  |  2KB  |  64 lines

  1. /* $VER: Warp Text 1.0 (11.20.96)
  2.    Copyright 1996 SoftLogik Publishing Corporation
  3.    May not be distributed without SoftLogik Publishing Corporation's express written permission */
  4.  
  5. ADDRESS 'PAGESTREAM'
  6. options results
  7.  
  8. /* CHECK FOR OBJECTS */
  9. getselectedobjects
  10. if result<2 then call OOPS()
  11.  
  12. /* OPTIONS DIALOG BOX */
  13. allocarexxrequester '"Warp Text in Shape"' 360 57
  14.     hDialog=result
  15. addarexxgadget hDialog checkbox 12 12 106 label '"Bend Lines (slower, but better quality)"'
  16.     hCheckBend
  17. addarexxgadget hDialog exit 12 38 70 label "OK"
  18.     hOK=result
  19. addarexxgadget hDialog exit 278 38 70 label "Cancel"
  20.     hCancel=result
  21. doarexxrequester hDialog
  22.     action=result
  23. getarexxgadget hDialog hCheckBend checked
  24.     iBend=result
  25. freearexxrequester hDialog
  26. if action=hCancel then EXIT
  27.  
  28. /* BUSY DIALOG */
  29. 'lockinterface true'
  30. openbusyrequester message "'Warping text...'" thermometer disabled abort disabled
  31.     hBusy=result
  32. 'refresh wait'
  33.  
  34. /* WARP TEXT */
  35. 'maketextfxpath'
  36. if rc~=0 then do
  37.     'refresh continue'
  38.     'lockinterface false'
  39.     call OOPS()
  40. end
  41. if iBend=0 then 'edittextobj textfx warp bendlines false distortx false'
  42. if iBend=1 then 'edittextobj textfx warp bendlines true distortx false'
  43.  
  44. 'closebusyrequester 'hBusy
  45. 'refresh continue'
  46. 'refreshwindow'
  47. 'lockinterface false'
  48.  
  49. EXIT
  50.  
  51. OOPS:
  52. /* TextFX not installed or wrong objects */
  53.  
  54.     allocarexxrequester '"Cannot Warp Text"' 418 67
  55.         hAlert=result
  56.     addarexxgadget hAlert TEXT 8 12 400 border none string '"You must have TextFX 2 installed and select a text"'
  57.     addarexxgadget hAlert TEXT 8 24 400 border none string '"block and a shape or path to use this script."'
  58.     addarexxgadget hAlert EXIT 336 48 70 label "Exit"
  59.     doarexxrequester hAlert
  60.     freearexxrequester hAlert
  61.  
  62. EXIT
  63. RETURN
  64.